package StructuralPattern.Adapter.DoubleAdapter;

public class CatDogAdapter implements CatTarget,DogTarget{

    private CatTarget catTarget;
    private DogTarget dogTarget;

    public CatDogAdapter() {
        catTarget = new Cat();
        dogTarget = new Dog();
    }

    @Override
    public void catchMouse() {
        dogTarget.cry();
    }

    @Override
    public void cry() {
        catTarget.catchMouse();
    }
}
